import java.util.Scanner;

public class Main {



    //对称之美
    public static boolean hasCommonChar(boolean[] s1,boolean[] s2){
        for (int i = 0; i < 26; i++) {
            if(s1[i] && s2[i]) return true;
        }
        return false;
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        for(int i =0;i<t;i++){
            int n = in.nextInt();
            boolean[][] hash = new boolean[n][26];
            for(int j =0;j<n;j++){
                String s = in.next();
                for (char c:s.toCharArray()) {
                    hash[i][c-'a'] = true;
                }
            }
            boolean isPossible = true;
            int left = 0;
            int right = n-1;
            while(left<right){
                if(!hasCommonChar(hash[left],hash[right])){
                    isPossible = false;
                    break;
                }
                left++;
                right--;
            }
            System.out.println(isPossible ? "Yes" : "No");
        }
    }













    //礼物的最大价值
    public int maxValue(int[][] grid){
        if(grid == null || grid.length<=0) return 0;
        int[] dp = new int[grid[0].length+1];
        for (int i = 1; i <= grid.length; i++) {
            for (int j = 1; j <= grid[0].length; j++) {
                dp[j] = Math.max(dp[j-1],dp[j])+grid[i-1][j-1];
            }
        }
        return dp[grid[0].length];
    }















    //小易的升级之路
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNextInt()) {
            int a = in.nextInt();
            int b = in.nextInt();
            int c = 0;
            for (int i = 0; i < a; i++) {
                c = in.nextInt();
                b = ss(b, c);
            }
            System.out.println(b);
        }
    }
    public static int ss(int a,int b){
        if(a>=b){
            a = a+b;
        }else{
            a = a+aa(a,b);
        }
        return  a;
    }
    public static int aa(int a,int b){
        while(b!=0){
            int k = a%b;
            a = b;
            b = k;
        }
        return a;
    }








}
